package com.code.generate.enums;

import java.util.HashMap;
import java.util.Map;

public enum FieldType {
	STRING("String"), INTEGER("Integer"), DATE("Date"), DATE_TIME("DateTime"), TIME("Time"), TIMESTAMP("Timestamp"), LONG("Long"), BIG_DECIMAL("BigDecimal"), DOUBLE("Double"), BOOLEAN(
			"Boolean"), MULTI_FILE("MultiFile");
	private String text;

	FieldType(String text) {
		this.text = text;
	}

	@Override
    public String toString() {
		return this.text;
	}

	public static String getImportString(String fieldType) {
		Map<String, String> map = new HashMap<>();
		map.put(FieldType.DATE.toString(), "import java.util.Date;");
		map.put(FieldType.BIG_DECIMAL.toString(), "import java.math.BigDecimal;");
		map.put(FieldType.TIMESTAMP.toString(), "import java.sql.Timestamp;");
		return map.get(fieldType);
	}
}
